<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>print window</title>
</head>
<body onload="load()">
<iframe id="iframe" style='display:none'></iframe>
</body>
<script type="text/javascript">
    function load() {
        debugger;
        iframe.onload = iframe.onreadystatechange = iframeload;
        iframe.src = "../accBusi/zqpzprint";

    }
    function iframeload() {
        debugger;
        var iframe = document.getElementById("iframe");
        var printDelay = 1000;

        if (!iframe.readyState || iframe.readyState == "complete") {
            setTimeout(function () {
                try {
                    iframe.focus();
                } catch (e) {
                }
                try {
                    iframe.contentWindow.print();
                } catch (e) {
                    console.error(e);
                    window.print();
                }
            }, printDelay);
        }
    }
</script>
</html>